class Solution(object):
    def increasingTriplet(self, nums):
        """
        :type nums: List[int]
        :rtype: bool
        """
        res = [float('inf'), float('inf')]
        for num in nums:
            # res中第一个值一定是返回True前半部分的最小值
            if num > res[1]:
                return True
            if num <= res[0]:
                res[0] = num
            else:
                res[1] = num
        return False